<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no">
    <title>退款完成</title>
    <link rel="stylesheet" href="__PUBLIC__/Home/css/memberOrder.css">
    <include file="Public/common_js"/>
</head>
<body>
<div class="warp">
    <!--退款top-->
    <div class="member-refund-top member-refund-return3">
        <i></i>
        <ul class="">
            <li><span>申请退货</span></li>
            <li><span>审核受理</span></li>
            <li class="active"><span>进行退货</span></li>
            <li><span>退货确认</span></li>
            <li><span>完成退款</span></li>
        </ul>
    </div>
    <!--退款订单的信息-->
    <div class="member-refund-price mgTop">
        <p>
            <label>退款金额：</label>
            <span>{$refund.price}</span>
        </p>
        <p>
            <label>退款原因：</label>
            <span>{$refund.message}</span>
        </p>
        <p>
            <label>审核结果：</label>
            <if condition="$refund['status'] eq '2'">
                <span class="green">审核通过</span>
                <else/>
                <span class="red">审核未通过</span>
            </if>
        </p>
    </div>
    <!--退款原因-->
    <div class="refund-mes-form refund-bottom mgTop">
        <div class="refund-mes-title">退款跟踪</div>
        <ul>
            <li class="refund-mes-card">
                <i></i>
                <div class="refund-mes-title">
                    提交申请
                    <span>{:get_refund_goods_time($refund['id'], 1)}</span>
                </div>
                <p>退款申请已经提交，客服将在1-2个工作日内受理。<br/>如有疑问，请您拨打客服电话 <span class="sp-phone">{$mobile}</span></p>
            </li>
            <if condition="$refund['status'] eq '2'">
                <li class="refund-mes-card mgTop">
                    <i></i>
                    <div class="refund-mes-title">
                        审核通过
                        <span>{:get_refund_goods_time($refund['id'], 2)}</span>
                    </div>
                    <p>你的退货申请已通过审核，请在7天内寄回退货商品并提交物流信息，过期将自动取消申请</p>
                </li>
                <li class="refund-mes-card mgTop">
                    <i></i>
                    <div class="refund-mes-title">
                        退回商品
                    </div>
                    <p class="mgTop"><a id="write-wlinfo" href="javascript:void(0);" class="btn btn-second btn-block">填写物流信息</a></p>
                </li>
                <else/>
                <li class="mgTop">
                    <i></i>
                    <div class="refund-mes-title">
                        审核未通过
                        <span>{:get_refund_goods_time($refund['id'], 0)}</span>
                    </div>
                    <p>你的退款申请已被驳回<br/>如有疑问，请您拨打客服电话 <span class="sp-phone">{$mobile}</span></p>
                    <p class="mgTop"><a href="javascript:void(0);" class="btn btn-second btn-block reapply">重新申请</a></p>
                </li>
            </if>
        </ul>
    </div>
</div>
<!-- 填写物流信息 -->
<div class="member-reminder" style="display: none">
    <a href="javascript:;" class="close clearfix"></a>
    <div class="tip">
        在您将退货的商品寄出后，在此填写相关物流信息。
    </div>
    <div class="container warp">
        <h4 class="tit">退货方式：</h4>
        <span class="minpad"></span>
        <div class="select-template">
            <input id="wuliu-company" type="text" placeholder="请选择退货方式"  />
            <input id="wuliu-order" type="hidden" value="{$refund['order_id']}" />
            <input id="wuliu-id" type="hidden" value="{$refund['id']}" />
            <i></i>
        </div>
        <span class="minpad"></span>
        <span class="sp-ommit" style='display:block;'>（如果您采取自送方式，请选择上门退货）</span>
        <span class="minpad20"></span>
        <div id="wl-orderid-area">
            <h4 class="tit">物流单号：</h4>
            <span class="minpad"></span>
            <input id="wuliu-no" type="text" placeholder="填写物流单号" />
            <span class="minpad40"></span>
        </div>
        <a id="save-wlinfo" href="javascript:;" class="btn btn-second btn-block">提交信息</a>
    </div>
</div>

<script type="text/javascript">
	$('.reapply').click(function () {
        $.post("/MemberRefundReturn/ajaxReplay", {
                order_id: "{$refund['order_id']}",
                id: "{$refund['id']}"
            },
            function (result) {
                if (result == 1) {
                    window.location.reload();
                }else {
                    alert('申请失败');
                }
            });
    });
	require(['refund/ReturnWuliu']);
</script>
</body>
</html>